// with polyfills
import 'core-js/stable'
import 'regenerator-runtime/runtime'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/'
import i18n from './locales'
import { VueAxios } from './utils/request'
import ProLayout, { PageHeaderWrapper } from '@ant-design-vue/pro-layout'
import themePluginConfig from '../config/themePluginConfig'
import RichEditor from '@/components/richEditor/RichEditor'
import '@/icons'
// 引用vue-echars echarts
import ECharts from 'vue-echarts/components/ECharts'
import { message as Ero } from 'ant-design-vue';
import { removeHTMLTags } from '@/utils/common';

// eslint-disable-next-line no-unused-vars
import echarts from 'echarts'
// mock
// WARNING: `mockjs` NOT SUPPORT `IE` PLEASE DO NOT USE IN `production` ENV.
// import './mock'

import bootstrap from './core/bootstrap'
import { d, c, r } from  './core/lazy_use' // use lazy load components
import './permission' // permission control
import './utils/filter' // global filter
import './global.less'

import VideoPlayer from 'vue-video-player'
import 'vue-video-player/src/custom-theme.css'
import 'video.js/dist/video-js.css'
const date = d;

// vue-echarts为全局组件
Vue.component('VueEcharts', ECharts)

Vue.config.productionTip = false
const e = 'EI_RI_TR_OB_RM';
Vue.filter('htmlFilter', function(value) {
  if (value) {
    return removeHTMLTags(value);
  } else {
    return '';
  }
});

// mount axios to `Vue.$http` and `this.$http`
Vue.use(VueAxios)
// use pro-layout components
Vue.component('pro-layout', ProLayout)
Vue.component('page-container', PageHeaderWrapper)
Vue.component('page-header-wrapper', PageHeaderWrapper)
Vue.component('RichEditor', RichEditor)

window.umi_plugin_ant_themeVar = themePluginConfig.theme

Vue.use(VideoPlayer)
import { Pagination, Spin, Empty  } from 'ant-design-vue';
Vue.component(Pagination.name, Pagination);
Vue.component(Spin.name, Spin);
Vue.component(Empty.name, Empty);
import VueClipboard from 'vue-clipboard2'

Vue.use(VueClipboard)
new Vue({
  router,
  store,
  i18n,
  // init localstorage, vuex, Logo message
  created: bootstrap,
  render: h => h(App)
}).$mount('#app')
